<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <button class="btn">点点我</button>
    <script>
      var btn = document.querySelector(".btn");
      const person = {
        name: "黎绍原",
        age: 21,
        sex: "男",
      };
      btn.onclick = function(){
        console.log(Reflect.get(person,'name'));
        let a = Reflect.set(person,'age',23)
        console.log(person,a);
        let b = Reflect.deleteProperty(person,'age');
        console.log(b,person);
      }
    </script>
  </body>
</html>
